package com.atguigu.scala.chapter_06_practice

object Scala_13 {
  def main(args: Array[String]): Unit = {
   def func(a:Int):Long={
     if (a<=1){
       1
     }else{
       a*func(a-1)
     }
   }
    println(func(scala.io.StdIn.readInt()))
  }

}
